﻿namespace OasisCiq.Xpil
{
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using Xnl;
    using XS;

    /// <summary>
    /// Identifier to recognise the party such as customer identifer, 
    /// social security number, National ID Card, tax number, 
    /// buiness number, company number, company registration, etc
    /// </summary>
    public class Identifier : List<IdentifierElement>, IValidityDateGroup, IDataQualityGroup, IExtendedAttributes
    {
        public Identifier()
        {
        }

        public Identifier(int capacity)
            : base(capacity)
        {
        }

        public Identifier(IEnumerable<IdentifierElement> collection)
            : base(collection)
        {
        }

        /// <summary>
        /// Reference to a Party element that describes the issuing organisation
        /// </summary>
        public OrganisationNameType IssuerName { get; set; }

        /// <summary>
        /// Type of identifier. e.g. Tax Number
        /// </summary>
        public PartyIdentifierTypeList Type { get; set; }

        /// <summary>
        /// Status of the entity. e.g. Old, Current, Inactive, Active, etc
        /// </summary>
        public StatusList Status { get; set; }

        /// <summary>
        /// Could be start date, issue date, validity start date, etc
        /// </summary>
        public XSDateTime DateValidFrom { get; set; }

        /// <summary>
        /// Could be end date, expiry date, validity end date, etc
        /// </summary>
        public XSDateTime DateValidTo { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public XSDateTime ValidTo { get; set; }

        public NameValueCollection ExtendedAttributes { get; set; }
    }
}
